package avl.non_recursion_2;

/**
 * @author xing
 * @date 2023/1/10 15:33:52
 */
public class Main {
    public static void main(String[] args) {
        AVLTree<Integer> tree = new AVLTree<>();
        tree.insertElement(1);
        tree.insertElement(20);
        tree.insertElement(2);
        tree.insertElement(19);
        tree.insertElement(3);
        tree.insertElement(18);
        tree.insertElement(4);
        tree.insertElement(17);
        tree.insertElement(5);
        tree.insertElement(16);
        tree.insertElement(6);
        tree.insertElement(15);
        tree.insertElement(7);
        tree.insertElement(14);
        tree.insertElement(8);
        tree.insertElement(13);
        tree.insertElement(9);
        tree.insertElement(12);
        tree.insertElement(10);
        tree.insertElement(11);

        tree.deleteElement(11);
        tree.deleteElement(14);
        tree.deleteElement(15);
        tree.deleteElement(16);
        tree.deleteElement(17);
        TreeUtils.show(tree.getRoot());
    }
}
